<?php
$this->headScript()->appendFile($this->baseUrl('js/modules/roles.js'));
$this->placeholder("navegacion")->set($this->navegacion($this->nav));
$perfil = App_Perfil::getInstance();
$perfil->cargar("ADMIN_USUARIOS");
$this->placeholder( 'contenttab' )->captureStart();
?>
<h2>Asignación de perfiles</h2>
<a href="<?=$this->baseUrl("/usuarios/detalle/perfil");?>" title="Volver" class="volver">Volver a asignación de roles</a>
<br/><br/>
<div align="center">
<div style="width: 700px;" align="left">
<form action="<?=$this->baseUrl("/usuarios/detalle/asignarpermisosusuario");?>" method="post" name="formapara" encType="multipart/form-data">
<input type="hidden" name="codrol" value="<?php echo $this->codrol;?>">
<table id="table_id" align="center" class="display">
 	<thead>
	    <tr>
	      <th width="60%">Funcionalidades</th>
	      <th width="10%">VER</th>
	      <th width="10%">CREAR</th>
	      <th width="10%">MODIFICAR</th>
	      <th width="10%">ELIMINAR</th>
	    </tr>
	</thead>
	<tbody>
    <tr>
	  <td>&nbsp;</td>
	  <td style="text-align:center;"><input type="checkbox" name="checkbox1" value="1" onclick="seleccionar_columna('ver',this);" checked="checked"/></td>
	  <td style="text-align:center;"><input type="checkbox" name="checkbox2" value="1" onclick="seleccionar_columna('cre',this);" checked="checked"/></td>
	  <td style="text-align:center;"><input type="checkbox" name="checkbox3" value="1" onclick="seleccionar_columna('mod',this);" checked="checked"/></td>
	  <td style="text-align:center;"><input type="checkbox" name="checkbox4" value="1" onclick="seleccionar_columna('eli',this);" checked="checked"/></td>
	</tr>
    <?php
       echo $this->asignacionFuncionalidadesUsuario;
	 ?>
   </tbody>
</table>
<?php if ($perfil->modificar()){?>
<div align="right"><input type="submit" value="Guardar permisos" class="btn btn-primary btn-sm"  /></div>
<?php }?>
</form>
</div>
</div>
<?php
$this->placeholder( 'contenttab' )->captureEnd();
$this->tabs->agregar_contenido("Perfiles y funcionalidades", $this->placeholder( 'contenttab' ));
echo $this->tabs->renderElement();
?>
<script type="text/javascript">
$(function() {
	var oTable = $('#table_id').dataTable({
		"bJQueryUI": true,
		"bFilter" :false,
		"bSort" :false,
		"bInfo": false,
		"bPaginate": false,
		"bAutoWidth": false
	});
	

});
</script>